import { request } from "@/utils/axios"


/**
 * 获取基本信息
 */
export function getInformation() {
    return request(
        {
            url: "/information/getInformation",
            method: "GET",
        }
    );
}

/**
 * 保存基本信息
 */
export function saveInformation(data) {
    return request(
        {
            url: `information/saveInformation`,
            method: "POST",
            data
        }
    );
}

/**
 * 获取地区
 */
export function getArea() {
    return request(
        {
            url: `/information/getArea?pid=1`,
            method: "GET",
            data: {}
        }
    );
}

/**
 * 根据pid 获取上层管理者的信息
 */
export function getManager(pid) {
    return request(
        {
            url: `information/getManager?pid=${pid}`,
            method: "GET",
            data: {}
        }
    );
}

// 查询指定key的配置内容
export function getSysConfig() {
    return request(
        {
            url: `information/getSysConfig?key=downloadUrl`,
            method: "GET",
            data: {}
        }
    );
}
// 修改指定配置
export function updateSysConfig(data) {
    return request(
        {
            url: `organizing/updateSysConfig`,
            method: "PUT",
            data
        }
    );
}

